<#escape x as (x)!?html>
    <head>
        <script type="text/javascript">
            var menuId = "Settings_Channel";

            function update(e) {

                $('input[name$="inclusiveTaxRate"]').eq(0).val($('input[name$="inclusiveTaxRate"]').eq(0).attr("checked"));

                if (!validateInputs($("#mainForm"))) {
                    return;
                }
                $.ajax({
                    type:"POST",
                    url:"edit!ajaxSubmit.action",
                    data:$("#mainForm").serialize(),
                    dataType:"json",
                    success:function (echo) {
                        if (echo.result == true) {
                            showTip(e, "Save success！");
                        } else {
                            showTip(e, echo.result);
                        }
                    },
                    async:false
                });
            }
        </script>
    </head>
    <body>

    <form id="mainForm">
        <fieldset>
            <legend>
                <span class="title">Channel Information</span>
            </legend>
            <table class="property_table">
                <tr>
                    <td class="key">Passport:</td>
                    <td class="key">
                        <input type="text" class="longText" name="passport"
                               validator="notEmpty" value="${passport}" readonly
                               style="background-color:#aaa"/>
                    </td>
                </tr>
                <tr>
                    <td class=" key">ID:</td>
                    <td class="key">
                        <input type="text" class="longText" name="id" validator="notEmpty" value="${id}"/>
                    </td>
                </tr>
                <tr>
                    <td class=" key">Code:</td>
                    <td class="key">
                        <input type="text" class="longText" name="code" validator="notEmpty" value="${code}"/>
                    </td>
                </tr>
                <tr>
                    <td class=" key">Name:</td>
                    <td class="key">
                        <input type="text" class="longText" name="name" validator="notEmpty" value="${name}"/>
                    </td>
                </tr>

                <tr>
                    <td class="key">IATA:</td>
                    <td class="key">
                        <input type="text" class="longText" name="iataNumber" value="${iataNumber}"/>
                    </td>
                </tr>
                <tr>
                    <td class="key">UserName:</td>
                    <td class="key"><input type="text" class="longText" name="userName" value="${userName}" validator="notEmpty"/></td>
                </tr>
                <tr>
                    <td class="key">Password:</td>
                    <td class="key"><input type="text" class="longText" name="password" value="${password}" validator="notEmpty"/></td>
                </tr>
                <tr>
                    <td class="key">Tax Policy:</td>
                    <td class="value">
                        [FIXED<input type="radio" name="taxPolicy"  value="FIXED" <#if taxPolicy=='FIXED'> checked="checked" </#if> />]
                        [PERCENT<input type="radio" name="taxPolicy" value="PERCENT" <#if taxPolicy=='PERCENT'> checked="checked" </#if> />]
                        [NONE<input type="radio" name="taxPolicy"  value="NONE" <#if taxPolicy=='NONE'> checked="checked" </#if> />]
                    </td>
                </tr>
                <tr>
                    <td class="key">Inclusive Tax Rate:</td>
                    <td class="key">
                        True?:<input type="checkbox" class="longText" name="inclusiveTaxRate" <#if inclusiveTaxRate> checked="checked" </#if>/>
                    </td>
                </tr>
            </table>
        </fieldset>
        <input type="button" value="Save" class="btn" onclick="update($(this))"/>
        <input type="button" value="Back" class="btn" onclick="window.location.href='query.action'"/>
    </form>
    </body>
</#escape>